/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package com.pancho;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SolutionDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idSolution;
	public final StringExpression solution;
	
	public SolutionDetachedCriteria() {
		super(com.pancho.Solution.class, com.pancho.SolutionCriteria.class);
		idSolution = new IntegerExpression("idSolution", this.getDetachedCriteria());
		solution = new StringExpression("solution", this.getDetachedCriteria());
	}
	
	public SolutionDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, com.pancho.SolutionCriteria.class);
		idSolution = new IntegerExpression("idSolution", this.getDetachedCriteria());
		solution = new StringExpression("solution", this.getDetachedCriteria());
	}
	
	public DiagnoseDetachedCriteria createDiagnoseidDiagCriteria() {
		return new DiagnoseDetachedCriteria(createCriteria("diagnoseidDiag"));
	}
	
	public Solution uniqueSolution(PersistentSession session) {
		return (Solution) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Solution[] listSolution(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Solution[]) list.toArray(new Solution[list.size()]);
	}
}

